Now that you know how SharePoint fits into the bigger
picture, let’s look at the features and tools that are available to us
when developing BI solutions.
1. Excel Services
One of the things
about Excel is that it’s commonly used to hold a lot of vital management
information within an organization. In an ideal world, every useful
piece of data would be found in a data warehouse and would be accessed
via OLAP or some other reporting mechanism. In the real world, that just
isn’t the case. Despite the best efforts of BI professionals the world
over, business users simply find Excel to be easy to use and an
essential tool for performing their day-to-day jobs. In the real world,
some vital data will always live in Excel.
Rather than chasing some data warehousing utopia, a
more effective approach is to allow users to continue to use Excel. By
taking advantage of the features offered by Excel Services, data managed
and stored in Excel workbooks can play an important part in an
organization’s BI strategy. All the tools available within SharePoint
can make use of Excel data as readily as OLAP data or relational data
from SQL Server.
As well as making effective use of data stored within
Excel workbooks, you’ve seen how the Excel application forms a key part
of the Microsoft BI solution. The analytical and display capabilities
coupled with a general familiarity with the product represent an
unbeatable combination that should always form a core part of any BI
strategy. By allowing workbooks to be hosted in Excel services and used
via a web browser, SharePoint extends the reach of the powerful features
of Excel beyond the desktop.
2. Business Intelligence Web Parts
SharePoint provides a few basic BI web parts out of
the box. As a platform that’s often used for creating intranet sites and
other organizational portals, the web parts allow users to include
important performance metrics within portal pages easily. Along with web
parts that are used to display information, SharePoint also defines a
number of content types specifically for storing BI data. Based on the
Common Indication Columns content type, these additional content types
all describe business metrics that can be displayed using the built-in
web parts.
The indicator types available out of the box include the following:
Excel-based status indicator
This indicator is used for retrieving values from an Excel workbook
hosted using Excel services. The indicator can refer either to a cell
address such as Sheet1!$A$1 or a named range such as MyIndicator.
Fixed Value–based status indicator The Fixed Value indicator has been designed to be manually updated. However, it’s particularly useful to us as developers, because its value can be manipulated programmatically as the following code sample shows:
static bool SetIndicatorValue(SPWeb web, string listName,
string indicatorName, double newValue)
{
SPList list = web.Lists.TryGetList(listName);
if (list != null)
{
SPContentTypeId myct = new
SPContentTypeId("0x00A7470EADF4194E2E9ED1031B61DA088401");
bool supportsContentType = (from SPContentType ct in list.ContentTypes
where ct.Id.IsChildOf(myct)
select true).First();
if (supportsContentType)
{
//Note: Only use this technique on very small lists. For larger lists a
//CAML query will offer much better performance
SPListItemCollection listItems = list.Items;
SPListItem item = (from SPListItem indicator in list.Items
where indicator.Title == indicatorName
select indicator).First();
if (item != null)
{
if (item.Fields.ContainsField("Value"))
{
item["Value"] = newValue;
item.Update();
return true;
}
}
}
}
return false;
}
SharePoint list–based status indicator
While a fixed value indicator makes use of a single value stored within
SharePoint, the SharePoint list–based indicator makes use of all items
in a SharePoint list. The value of the indicator can be either the
number of the items in the list or the percentage of the items where a
particular condition is met or even a calculation based on the values of
particular fields in the list. This indicator is especially useful for
showing metrics for data that is created and managed within SharePoint.
SQL Server Analysis Service–based status indicator As
you’ve seen, most BI data is processed using OLAP. The SQL Server
Analysis Services indicator allows you to display an indicator easily
from an OLAP cube.
Note
At the time of writing, on SharePoint 2010 Beta 2,
it’s not possible to create a custom list with the facilities to add new
indicators. Although the appropriate content types can be added to the
list, they’re not displayed in the New Item menu and therefore can’t be
created. To resolve this problem, enable the SharePoint Server
Enterprise Site Features option within Site Settings, and then create an
indicator list using the Status List template, as shown next:
Several built-in web parts are available out of the box and are discussed in the following sections.
Indicator Details Web Part
The Indicator Details web part can be used to display
details of a single indicator value. As you’ve seen, all indicator
values are derived from the Common Indicator Columns content type, and
each of these types can be appropriately rendered using the Indicator
Details web part.
The following screenshots show the configuration settings and rendered output of an indicator derived from an Excel workbook:
Status List Web Part
The Status List web part works in a similar fashion
to the Indicator Details web part, except the Status List web part shows
all indicators from a specific SharePoint list. Indicators derive from a
common content type, and by creating a list based on this content type,
we can store a number of different indicators in a single location. The
Status List web part renders each indicator appropriately based on its
underlying source.
The Status List web part is useful for displaying a
range of important metrics on an intranet page or other portal site, as
shown here:
Chart Web Part
The
Chart web part is a useful new addition in SharePoint 2010. Data can be
retrieved from Lists, Business Connectivity Services, or Excel
Services. Alternatively, the chart control can be connected to another
web part, which can act as a data source for the control.